class Result {
  constructor(code, msg, data) {
    this.code = code;
    this.message = msg;
    this.data = data;
  }

  static SuccessResult(msg, data) {
    return new Result(0, msg, data || null);
  }

  static ErrorResult(msg, data) {
    return new Result(-1, msg, data);
  }
}

module.exports = Result;